package com.hqyj.module.index.controller;

import com.hqyj.module.index.pojo.Honour;
import com.hqyj.module.index.service.HonourService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author lap
 * @version 1.0
 * @date 2021/10/8 16:35
 */

@RestController
@RequestMapping("/user-info")
public class HonourController {

    @Autowired
    HonourService honourService;

    @GetMapping("/getLate")
    public Honour getLate() {
        Honour late = honourService.getLate();
        return late;
    }

    @GetMapping("/updateTime")
    public Integer updateTime() {
        Integer integer = honourService.updateTime();
        return integer;
    }

    @GetMapping("/getLoadLateAndEarly")
    public List<Honour> getLoadLateAndEarly() {
        List<Honour> loadLateAndEarly = honourService.getLoadLateAndEarly();
        return loadLateAndEarly;
    }

    @GetMapping("/getLeave")
    public Honour getLeave() {
        Honour late = honourService.getLeave();
        return late;
    }

    @GetMapping("/getThing")
    public Honour getThing() {
        Honour late = honourService.getThing();
        return late;
    }

    @GetMapping("/getBusiness")
    public Honour getBusiness() {
        Honour late = honourService.getBusiness();
        return late;
    }
}
